<?php

class spScript extends spElement
{
	public function __construct( $data=null )
	{
		parent::__construct( "script", $data );
		parent::setMustHaveEndingTag( true );
		
		if ( isset($data["charset"]) )
			$this->setCharset( $data["charset"] );

		if ( isset($data["src"]) )
			$this->setSource( $data["src"] );

		if ( isset($data["type"]) )
			$this->setType( $data["type"] );

		if ( isset($data["language"]) )
			$this->setType( $data["language"] );
	}
	
	public function setLanguage( $language )
	{
		parent::addAttr( "language", $language );
	}
	
	public function setCharset( $charset )
	{
		parent::addAttr( "charset", $charset );
	}
	
	public function setSource( $source )
	{
		parent::addAttr( "src", $source );
	}

	public function setType( $type )
	{
		parent::addAttr( "type", $type );
	}
}

?>